home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
- Path: ncrgw2.ncr.com!ncrhub6!daynews!falcon!news
- From: Dick Menninger <Dick.Menninger@DaytonOH.ATTGIS.COM>
- Subject: Re: Hungarian notation
- X-Nntp-Posting-Host: 149.25.99.44
- Message-ID: <DKoBrn.CHs@falcon.daytonoh.attgis.com>
- Sender: news@falcon.daytonoh.attgis.com (News administrative Login)
- Reply-To: Dick.Menninger@DaytonOH.ATTGIS.COM (mennid)
- Organization: AT&T Global Information Solutions
- X-Newsreader: DiscussIT 2.5.1.3 for MS Windows [AT&T Software Products Division]
- References: <4cf8hf$8fe@hopi.gate.net>
- Date: Thu, 4 Jan 1996 20:33:23 GMT
-
- Imbedding type information in a name had some utility
- in the older C environments with the weak type checking
- and very poor tools (no way to click on a variable and
- find out the minutae of its implementation). Even there,
- a price was paid that required C lexical recognizing
- translation (old name to new name) tools to ease evolution
- messes that resulted. The imbedding of type information
- in variable names is really a poor substitute for good
- documentation and tools.
-
- The purpose of C++ in its design
- and evolution has been to hide implementation while
- providing genuinely heavy duty compile-time type checking.
- A development environment must allow you to click
- on the variable and get the info you need. Its name
- provides the concept it represents, not its currrent
- implementation.
-
- I strongly suspect that people who prefer imbedding
- type in names are composed of people who see C++
- more as a better C than as what the definers of it mean.
-
-
- > ==========Michael Feathers, 1/3/96==========
- >
- > jguthrie@brokersys.com wrote:
- > : Michael Feathers (feathers@gate.net) wrote:
- > :
- > : : Where I work, all the truly portable code is written in terms of
- > : : typedefs. We alter the typedefs in an include file to alter data
- > : : sizes and performance characeristic, and our variant of Hungarian
- > : : uses these type names.
- > :
- > : Why don't you just abandon the type declarations completely and use a
- > : prefix on the variable names to define the type? Hey, wait a minute.
- > : I've seen this BEFORE! What was it called? FORTRAN, wasn't it? And
- > : how about how those old microcomputer BASICs used suffixes
- to determine
- > : types?
- > :
- > : The more things change, the more they stay the same.
- >
- > Maybe there's a reason for that ;-)
- >
- > : My attitude remains the same: Any naming convention works
- better than
- > : none, but embedding the type in the name is probably a bad idea.
- >
- > I really don't see why. Hungarian is particularly useful in the
- > presence of polymorphism.
- >
- > How can it hurt?
- >
- >
-
-
- Good Day
- Dick
- Dick.Menninger@DaytonOH.ATTGIS.COM
-
-